@using BootBlazor.Servers.Auth
@using BootBlazor.Servers.Helper
@using BootBlazor.Servers.Data
@using BootBlazor.Servers.Services
<MudDialog>
    <DialogContent>
        <div style="width:300px;">
            <EditForm Model="UserModel" OnValidSubmit="CreateSubmit" style="width:100%;">
                <DataAnnotationsValidator />
                <MudTextField @bind-Value="UserModel.UserName" Variant="Variant.Outlined" Margin="Margin.Dense"
                              Label="用户名" For="@(() => UserModel.UserName)"
                              UserAttributes="InputAttributes"></MudTextField>
                <MudTextField Class="mt-4" @bind-Value="UserModel.RealName" Variant="Variant.Outlined" Margin="Margin.Dense"
                              Label="姓名" For="@(() => UserModel.RealName)"
                              UserAttributes="InputAttributes"></MudTextField>
                <MudTextField Class="mt-4" @bind-Value="UserModel.Email" Variant="Variant.Outlined" Margin="Margin.Dense"
                              Label="邮箱" For="@(() => UserModel.Email)"
                              UserAttributes="InputAttributes"></MudTextField>
                <MudTextField Class="mt-4" @bind-Value="UserModel.PhoneNumber" Variant="Variant.Outlined" Margin="Margin.Dense"
                              Label="电话号码" For="@(() => UserModel.PhoneNumber)"
                              UserAttributes="InputAttributes"></MudTextField>
                <MudTextField Class="mt-4" @bind-Value="UserModel.Password" Variant="Variant.Outlined" Margin="Margin.Dense"
                              Label="密码" For="@(() => UserModel.Password)" InputType="InputType.Password"></MudTextField>
                <div class="mt-4 d-flex align-center">
                    <MudSpacer />
                    <MudButton Variant="Variant.Text" Color="Color.Primary" Size="Size.Medium"
                               ButtonType="ButtonType.Submit" StartIcon="@Icons.Material.Filled.Upload">@Loc["UserPage_SubmitText"]</MudButton>
                </div>
            </EditForm>
        </div>
    </DialogContent>
</MudDialog>
